<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-model指令的用法</title>
		<!-- 引入vue的js文件 -->
		<script src="js/vue.js"></script>
	</head>
	<body>		
		<div id="app">			
			<button @click="doit()">点击</button>
			<input type="text" v-model="msg"/>
			<h2>{{msg}}</h2>
		</div>		
	</body>
	<script>
	var app=new Vue({
		el:"#app",
		data:{
			msg:"helloworld!"			
		},
		methods:{
			doit:function(){
				this.msg="验证v-model的双向绑定"
			},
			writeMsg:function(){
				console.log(1111)
			}
			
		}
	})	
	</script>
</html>
